package belf.migrate.api.type;

public enum MatchingType {
    FULL_MATCH(0,"full_compatible", "完全兼容"),
    CONVERT_MATCH(1, "need_convert", "需要转换"),
    NO_MATCH(2, "no_compatible", "不兼容");

    private int id;
    private String type;

    private String desc;

    private MatchingType(Integer id, String type, String desc)
    {
        this.id = id;
        this.type = type;
        this.desc = desc;
    }

    public String getType()
    {
        return type;
    }

    public int getId()
    {
        return id;
    }

    public String getDesc()
    {
        return desc;
    }

    public static String getTypeById(int id)
    {
        for (MatchingType type : MatchingType.values())
        {
            if (type.getId() == id)
            {
                return type.getType();
            }
        }
        return null;
    }
}
